package com.sixth.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sixth.entity.BottomArticle;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
@Component
public interface BottomArticleDao extends BaseMapper<BottomArticle> {
    int deleteByPrimaryKey(String id);

    int insert(BottomArticle record);

    int insertSelective(BottomArticle record);

    BottomArticle selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(BottomArticle record);

    int updateByPrimaryKey(BottomArticle record);

    List<BottomArticle> selectBottomByCondition(@Param("name") String name, @Param("isDisable") Integer isDisable);



    int addBott(@Param("id") String id, @Param("bottomArticle") BottomArticle bottomArticle);

    int changeStatusByid(@Param("id") String id,@Param("isDisable") Integer isDisable);

    void addBottom(@Param("id") String id,@Param("parentId") String parentId,@Param("name") String name,@Param("date") Date date,@Param("date1") Date date1,@Param("isDisable") Integer isDisable,@Param("isDeleted") Integer isDeleted,@Param("bottomArticle") BottomArticle bottomArticle);


    @Update("update tb_bottom_article set name=#{name} where id=#{id}")
    int UpdateBottom(@Param("id")String id,@Param("name") String name);

    void changeStatusByPid(@Param("id") String id,@Param("isDisable") Integer isDisable);
}